package cn.dw.mm.controller;

import org.activiti.engine.FormService;
import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ManagementService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.dw.mm.activiti.ActivitiUtils;


public abstract class ActivitiAbstractController {
	 protected Logger logger = LoggerFactory.getLogger(getClass());

	    protected ProcessEngine processEngine = null;
	    protected RepositoryService repositoryService;
	    protected RuntimeService runtimeService;
	    protected TaskService taskService;
	    protected HistoryService historyService;
	    protected IdentityService identityService;
	    protected ManagementService managementService;
	    protected FormService formService;

	    public ActivitiAbstractController() {
	        super();
	        processEngine = ActivitiUtils.getProcessEngine();
	        repositoryService = processEngine.getRepositoryService();
	        runtimeService = processEngine.getRuntimeService();
	        taskService = processEngine.getTaskService();
	        historyService = processEngine.getHistoryService();
	        identityService = processEngine.getIdentityService();
	        managementService = processEngine.getManagementService();
	        formService = processEngine.getFormService();
	    }
}
